#pragma once
#ifndef __NOTIFICATION_H__
#define __NOTIFICATION_H__
#ifdef USE_NOTIFICATION
#include <stdint.h>
#include <stdbool.h>
/**
 * 日程记录今天的即将发生的, 消息记录跟来电一起记录最近的5条
 *
 *
 */

/**
 * @brief 返回消息一共有多少条
 *        请确保不要在中断里调用
 *
 * @return uint32_t
 */
uint32_t notification_count(void);

typedef enum __notification_type_t
{
    notification_type_ancs_start,
    notification_type_ancs_call = notification_type_ancs_start, //!< 电话
    notification_type_ancs_sms,
    notification_type_ancs_wechat,
    notification_type_ancs_qq_ipad,
    notification_type_ancs_qq_iphone,
    notification_type_ancs_facebook,
    notification_type_ancs_messenger,
    notification_type_ancs_whatsapp,
    notification_type_ancs_twitter,
    notification_type_ancs_skype,
    notification_type_ancs_line,
    notification_type_ancs_linkedln,
    notification_type_ancs_instagram,
    notification_type_ancs_qq_tim,
    notification_type_ancs_snapchat,
    notification_type_ancs_others,
    notification_type_ancs_hang_up,
    notification_type_ancs_end,

    notification_type_remind_start = 0x100,
    notification_type_remind_once = notification_type_remind_start,
    notification_type_remind_day,
    notification_type_remind_week,
    notification_type_remind_month,
    notification_type_remind_year,
    notification_type_remind_end,
    //!< 未定义完全，后续补完
} notification_type_t;

typedef struct __notification_get_para_t
{
    int index;                  //!<[in] 获取第几个消息的信息, 从0开始
    notification_type_t type;   //!< [out] 消息类型，见notification_type_t定义, 如果不需要，可传0
    uint32_t time;              //!< [out] 消息时间, ios为消息在手机产生的手机本地时间，android为手环接受到的手环时间，如果不需要，可传0
    uint8_t *p_content_buff;    //!< [out] 消息内容，utf-8格式，如果不需要，可传0
    uint32_t content_buff_size; //!< [in] 消息内容长度，如果不需要，可传0 [out]content_buff里实际填充的字节数，包括\0 结束符
} notification_get_para_t;

typedef struct __notification_remind_sort_t
{
    uint32_t time;
    uint8_t store_index;
}notification_remind_sort_t;
/**
 * @brief 请确保不要在中断里调用
 *        详细内容见notification_get_para_t
 *
 * @param para
 * @return true
 * @return false
 */
bool notification_get(notification_get_para_t *para);

void notification_remind_traverse_start(notification_remind_sort_t* buff);

void notification_remind_traverse_add(uint32_t remind_time, uint8_t store_index);

void notification_remind_end(void);

// void notification_print(void);
#endif //!<USE_NOTIFICATION
#endif //!< __NOTIFICATION_H__
